export enum OrdersStatusEnum {
  DFK = 0,
  DFH = 1,
  DSH = 2,
  DPJ = 3,
  YWC = 4,
  YQX = 5,
  YTK = 6,
}

export const OrdersOption = [
  {
    label: "全部订单",
    value: -1,
  },
  {
    label: "待支付",
    value: OrdersStatusEnum.DFK,
  },
  {
    label: "待发货",
    value: OrdersStatusEnum.DFH,
  },
  {
    label: "待收货",
    value: OrdersStatusEnum.DSH,
  },
  {
    label: "待评价",
    value: OrdersStatusEnum.DPJ,
  },
  {
    label: "已完成",
    value: OrdersStatusEnum.YWC,
  },
  {
    label: "已取消",
    value: OrdersStatusEnum.YQX,
  },
  {
    label: "已退款",
    value: OrdersStatusEnum.YTK,
  },
];

// 获取订单状态label
export function getOrdersStatusLabel(status: number) {
  const data = OrdersOption.find((item) => item.value === status);
  if (data) return data.label;
  return "全部订单";
}
